Repository navigation
air get: overlap the text view's run-only lookups with get-output - #7626
stevenchen-db wants to merge 2 commits into
Conversation
`air get` in text mode made five requests one after another: runs/get, get-output, a second runs/get for the serverless environment version, the MLflow run name, and the training-config export. The environment lookup and the config export depend only on the run, so start them right after the first runs/get and let them overlap get-output; start the MLflow name lookup before waiting on them. The list picker's detail pane shares the renderer and gets the same overlap. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
✅ Integration test reportCommit: dcad2e5
Top 3 slowest tests (at least 2 minutes):
|
| @@ -92,7 +93,39 @@ type runView struct { | |||
| // completed progress bar, and a field list, separated by blank lines. It is a | |||
There was a problem hiding this comment.
This comment describes renderRunText, but is now attached to runTextPrefetch. Can we move it back above renderRunText?
rclarey
left a comment
There was a problem hiding this comment.
This no longer merges into main: #7624 moved the environment, config and MLflow-name lookups out of renderRunText into enrichRunDetails in get.go, which already runs the three concurrently and now also runs for JSON output, so render.go and get_test.go conflict. Please rebase and rework this on top of that, keeping only what main still lacks (starting the environment and config reads before get-output), and revisit the text-only gate since JSON makes these lookups now too.
| config: inBackground(func() string { | ||
| // The config path is derived from the run alone, the same way the | ||
| // caller derives it before rendering. | ||
| data := buildGetData(run) |
There was a problem hiding this comment.
The prefetch builds a private getData and repeats the callers' genAIComputeTask(run) == nil / enrichFromAiRuntimeTask step just to get the config path, so the TrainingConfigPath the callers set on their own data is no longer read by anything. Can the callers build and enrich data before starting the prefetch and hand it (or the path) in, so there is one derivation instead of two kept in sync by a comment?
Changes
air getin text mode made five requests one after another:runs/get,get-output, a secondruns/getfor the serverless environment version (the typed SDKRunhas noenvironments), the MLflow run name, and the training-config export. The environment lookup and the config export depend only on the run, so they now start right after the firstruns/getand overlapget-output; the MLflow name lookup starts before waiting on them. The list picker's detail pane uses the same renderer and gets the same overlap. JSON output is unchanged (it makes none of these lookups).Why
On df1,
air get <run>(text) went from ~536-581ms to ~380-404ms median (10 runs per build, interleaved).Tests
TestGetTextOverlapsRunOnlyLookupsWithGetOutput: the server answersget-outputonly after the config export and the secondruns/getarrive; it fails on main.go test ./cmd/air(touched tests also with-race),TestAccept/air, lint pass.air gettext and JSON output byte-identical on three runs; JSON makes the same two requests; theair listdetail pane renders the same with the same requests.This pull request and its description were written by Isaac.